Versions:

  • 10

jpegtran is a command-line utility published by the Independent JPEG Group, currently available in version 10, designed for performing various useful transformations of JPEG files. Falling within the image processing and graphics conversion category, the software can translate the coded representation of an image from one variant of JPEG to another, such as converting from baseline JPEG to progressive JPEG or vice versa. It can also perform rearrangements of the image data itself, for example turning an image from landscape to portrait format by rotation. A distinguishing characteristic of jpegtran is the way it operates internally: it works by rearranging the compressed data, specifically the DCT coefficients, without ever fully decoding the image. As a result, its transformations are lossless, and there is no image degradation at all. This is a significant advantage over an alternative workflow in which a user would employ djpeg followed by cjpeg to accomplish the same conversion, since that approach would introduce quality loss. By the same token, however, jpegtran cannot perform lossy operations such as changing the image quality, because such changes would require decoding and re-encoding the image data. The tool reads a named JPEG/JFIF file, or the standard input if no file is named, and produces a JPEG/JFIF file on the standard output, which makes it well suited for scripting, batch processing, and integration into automated image-handling pipelines. Typical use cases include rotating or transposing photographs without quality loss, converting between baseline and progressive formats for web delivery, and performing other structural modifications of JPEG files where preserving the original compressed data is essential. With version 10 listed as the current release and one version recorded in total, jpegtran serves as a specialized, reliable solution for lossless JPEG manipulation.

Tags: